package cn.yunhe.crm.dao;

import cn.yunhe.crm.entity.Contract;
import cn.yunhe.crm.entity.ContractExample;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface ContractMapper {
    int countByExample(ContractExample example);

    int deleteByExample(ContractExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Contract record);

    int insertSelective(Contract record);

    List<Contract> selectByExample(ContractExample example);

    Contract selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Contract record, @Param("example") ContractExample example);

    int updateByExample(@Param("record") Contract record, @Param("example") ContractExample example);

    int updateByPrimaryKeySelective(Contract record);

    int updateByPrimaryKey(Contract record);

    //���ͬ���ϲ�����������ϵ��
    List contractlist(Map<String, Integer> map);


    int checkCountByYearAndMonth(Map map);

    /**
     * 根据合同名或id获取机构，联系人，审核状态等所有信�?
     * @param name
     * @return
     */
	Contract getAllMessageByMap(Map map);
	
	int checkProductA();
	
	int checkProductB();
	
	int checkProductC();

	int checkProductAbyYearAndMonth(Map map);
	
	int checkProductBbyYearAndMonth(Map map);
	
	int checkProductCbyYearAndMonth(Map map);
	
	int checkContractAmount();
	
	int checkContractAmountByYearAndMonth(Map map);
	
	int checkAmountByOid(int oid);
	int  checkCountByToday();
int checkCountAproductByToday();
	
	int checkCountBproductByToday();
	
	int checkCountCproductByToday();
}